


    <template>
    <div>
       <div class="touxaing">
       <van-icon name="arrow-left" @click="$router.push('/login')"/>
       <div class="tou_p">
           <div class="tp">
               <img src="../../assets/客户/头像.png" alt="" >
           </div>
           <div class="tpp">
              <span>名称:{{custData.custName}}</span>
              <span>电话:{{custData.telephone}}</span>
           </div>
          <div class="top" >
              <span @click="$router.push(`/custmerDetail/${custData.id}`)">客户信息</span>
           
        </div>
       </div>
       <van-icon name="wap-home-o" />
       </div>
    <!-- tab栏 -->
    <div class="tab">
     <van-tabs v-model="active"  @click="onClick">
  <van-tab title="收入分析" name="/income">
  <!-- <template #title>  <img src="../../assets/客户/收入分析.png" alt=""><i>收入分析</i>  </template> -->
  </van-tab>
  <van-tab title="旗下企业" name="/enterprise" ></van-tab>
  <van-tab title="合作伙伴" name='/partners'></van-tab>
  <van-tab title="当年收入" name='/incomeYear'></van-tab>
  <router-view></router-view>
</van-tabs>
 </div>

    </div>
</template>
<script>

import {custmer} from '../../request/api'
export default {
    data () {
        return {
           custData:'',
           count:1,
           Listdata:'',
            active:''
       
        }
    },
    methods:{
         onClick(name) {
       this.$router.push(name)
    },
    },
    created(){
        console.log(this.$route.params.id);
   custmer('1357521325212917762').then(res=>{
       console.log(res);
       this.custData=res.data
       this.Listdata=res.data.datas
       console.log(this.Listdata);
       this.$router.push('/income')
   })
}
}
</script>
 
<style lang = "less" >
.van-tab__text--ellipsis{
    display: flex;
    align-items: center;
    img{
        width: .14rem;
        height:.14rem;
    }
        
}
   .touxaing{
       height: 1.5rem;
       background:#003399 ;
       font-size: .24rem;
       line-height: 1.5rem;
       color: white;
       display: flex;
      align-items: baseline;
       .van-icon{
           width: .5rem;
           text-align: center;
           position: relative;
    top: -0.6rem;
       }
       .tou_p{
          height: .75rem;
    background: #fff;
    display: flex;
    font-size: .14rem;
    flex: 1;
    position: relative;
    top: 0.75rem;
    border-top-left-radius: .1rem;
    border-top-right-radius: .1rem;
    .tp{
      
        height: 100%;
        
        img{
        margin-bottom: .12rem;
            height: 80%;
        }
    }
    .tpp{
        display: flex;
    flex-wrap: wrap;
    align-content: center;
    width: 1.6rem;
        span{
            display: block;
           
         
            line-height: .3rem;
            color: #333;
        }
    }
    .top{
        font-size: .14rem;
    line-height: .75rem;
    color: blue;
    span{
        display: inline-block;
    height: .3rem;
    background: #ffcc33;
    line-height: .3rem;
    width: .70rem;
    text-align: center;
    border-top-left-radius: .1rem;
    border-bottom-left-radius: .1rem;
    color: #ffff;
    }
    }
       }
   }
   .vanrow{
       font-size: .14rem;
   }
   .active{
       border-bottom: .02rem solid #ffcc33;
   }
  .van-tabs__line{
    background-color: yellow;
}
</style>